<template>
<!-- 商品价格模块 -->
  <div id="DetailBasePrice">
    <div class="newPrice">￥{{realPrice}}</div>
    <div class="oldPrice">{{oldPrice}}</div>
    <div class="discount" v-if="discount">{{discount}}</div>
  </div>
</template>

<script>
export default {
  name: "DetailBasePrice",
  props:{
    realPrice:{//新的价格
      type:String
    },
    oldPrice:{//旧的价格
      type:String
    },
    discount:{//折扣信息
      type:String
    }
  }
}
</script>

<style scoped>
#DetailBasePrice{
  position: relative;
  display: flex;
  margin-top: 10px;
  width: 100%;
  height: 50px;
  line-height: 50px;
}
#DetailBasePrice div{
}
.newPrice {
  font-size: 28px;
  color: var(--color-high-text);
  width: 110px;
}
.oldPrice {
  width: 60px;
  font-size: 16px;
  color: #555555;
  text-decoration: line-through;
}
#DetailBasePrice .discount {
  position: relative;
  padding: 0 10px;
  height: 25px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: #FFFFFF;
  line-height: 25px;
  background-color: deeppink;
  border-radius: 20px;


}
</style>
